<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>创数小学</title>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body>
<div id="app"></div>
<script>
  //设置环境事件以更新vue
  var SetEnvEvent = document.createEvent('HTMLEvents');
  SetEnvEvent.initEvent('SetEnvEvent', false, false);
  var ENV = {
    loginState: {},
    api: {
      jyUrl: 'http://jy-test.17daxue.cn/web-jy/app/',
      statUrl: 'http://stat-test.17daxue.cn/web-stat/app/',
      imgUrl: 'http://img.17daxue.com/',
      el: "http://el-test.17daxue.cn/web-elementary/api/"
    }
  };
  var setEnv = function (obj) {
    try {
      ENV = JSON.parse(obj);
      document.dispatchEvent(SetEnvEvent);
    } catch (err) {
      console.error('设置环境变量失败');
    }
  };
  //TODO
  ENV.loginState = {
    "grade": 2015, "name": "测试一", "sex": 1, "status": 1, "token": "72954e828db110d4b2a6ce43b32c3665",
    "serverStudentId": 328074
  };
  document.dispatchEvent(SetEnvEvent);

  var global_guest = 1;
  var global_token = localStorage.getItem('currentUser_token');
  var global_student = localStorage.getItem('currentUser_id');

</script>
<!-- built files will be auto injected -->
</body>
</html>
